import Vue from "vue";
import VueRouter from "vue-router";
import layout from "../views/layout.vue";
import detail from "../views/article-detail.vue";
import like from "../views/like.vue";
import article from "../views/article.vue";
import collect from "../views/collect.vue";
import user from "../views/user.vue";
Vue.use(VueRouter);
const router = new VueRouter({
  routes: [
    {
      path: "/",
      component: layout,
      children: [
        {
          path: "/like",
          component: like,
        },
        {
          path: "/collect",
          component: collect,
        },
        {
          path: "/article",
          component: article,
        },
        {
          path: "/user",
          component: user,
        },
      ],
    },
    {
      path: "/detail",
      component: detail,
    },
  ],
});

export default router;
